<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
<title>红娘娘--首页</title>
<link rel="stylesheet" href="../lib/layui/css/layui.css">
<link rel="stylesheet" href="../res/static/css/index.css">
</head>
<body>
  <!-- nav部分 -->
 <div id="head"></div>
  <!-- banner部分 -->
  <div>
    <div class="layui-carousel" id="qwe">
      <div carousel-item >
        <div>
          <img src="../res/static/img/1.jpg" style="width:100%;height: 350px;">
          <div class="panel">
            <p class="title"></p>
            <p></p>
          </div>
        </div>
        <div>
          <img src="../res/static/img/img60841419910578.jpg" style="width:100%;height: 350px;">
          <div class="panel">
            <p class="title"></p>
            <p></p>
          </div>
        </div>
           <div>
          <img src="../res/static/img/1603252357.jpg" style="width:100%;height: 350px;">
          <div class="panel">
            <p class="title"></p>
            <p></p>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- main部分 -->
  <div class="main-product">
    <div class="layui-container">
      <p class="title">精选<span>高分用户</span></p>
      	<div class="main product">
		<div>
			搜索
			<form class="layui-form" action="">
				<div class="layui-inline">
					<label class="layui-form-label">输入框</label>
					<div class="layui-input-block">
						<input type="text" name="name" required lay-verify="required"
							placeholder="请输入标题" autocomplete="off" class="layui-input">
					</div>
				</div>

				<div class="layui-inline">
					<label class="layui-form-label">选择框</label>
					<div class="layui-input-block">
						<select name="pzl" lay-verify="required" id="pzl">

						</select>
					</div>
				</div>

				<div class="layui-inline">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>

					</div>
				</div>
			</form>
		</div>
		

	</div>
      <div class="layui-row layui-col-space25" id="productlist">
       	
        
        
      </div>
      
    </div>
  </div>
  <div id="box">
       	
        
        
  </div>
    
 <div id="footer"></div>
<script src="../lib/layui/layui.js"></script>
<script src="../js/jquery-1.8.2.js"></script>
<script>
layui.use(['element','table','layer','form'], function(){
	   var element = layui.element;
	   var table = layui.table;
	   var form=layui.form;
	   var layer = layui.layer;
	   var $=layui.$;
	   $(function() {
	     
	     $.ajax({
	     url:"../city",
	     type:"get",
	     data:{},
	     success:function(res){
	      var $select=$("#type");

	$select.append("<option value='0'>所有城市</option>");
	      for(var i=0;i<res.data.length;i++){
	       $select.append("<option value='"+res.data[i].CityId+"'>"+res.data[i].CityName+"</option>");
	      }
	      form.render();
	     },
	     dataType:"json"
	     
	    });
	    });
	    }); 
</script>
<script> 
var b = 900/300;//我的图片比例
//获取浏览器宽度
var W = $(window).width();
var H = $(window).height();
layui.use('carousel', function(){
    var carousel = layui.carousel;
    //建造实例
    carousel.render({
        elem: '#qwe'
        ,width: '100%' //设置容器宽度
        ,height: '350px'  //按比例和浏览器可视页面宽度来获取高度
        ,arrow: 'always' //始终显示箭头
        //,anim: 'updown' //切换动画方式
    });
});

//窗口变化是重新加载
$(window).resize(function () {
// setBanner();
window.location.reload()
})
</script>
<script>
layui.use('form', function() {
    var form = layui.form;

    //监听提交
    form.on('submit(sc)', function(data) {
     layer.msg(JSON.stringify(data.field)); 
     $.ajax({

      url : "../cxxx?page="+
        "1"+
        "&limit="+
        +"10",
      type : "get",
      data : data.field,
      success : function(res) {
       if (res.code ==0){
        var $box=$("#box");
        for(var i=0;i<res.data.length;i++){
         var p=res.data[i];
         $box.append("<div class='content layui-row'><div>"+
                     "<div class='layui-col-xs12 layui-col-sm6 alyui-col-md7 layui-col-lg6 content-img'>"+
                     "< img src='../img/"+p.img+"' width=200px></div>"+
                    " <div class='layui-col-xs12 layui-col-sm6 alyui-col-md5 layui-col-lg6 right'>"+
                     "<div class='news-panel'>"+
                     "<p class='label'>姓名："+p.name+"</p >"+
                       "<p class='detail'>性别："+p.sex+"</p >"+
                       "<p class='detail'>出生日期："+p.birthday+"</p >"+
                       "<p class='detail'>年龄："+p.age+"</p >"+
                       "<p class='detail'>城市："+p.xcity+"</p >"+
                       "<div>< a href='productDetail.html?id="+p.id+"'>查看产品</ a></div></div></div>");
        }
       }else {
        layer.msg("查询产品失败");
       }
      }
     });
     return false;
    });
   });   
	</script>
	<script>
		//Demo
		layui.use('form', function() {
			var form = layui.form;

			//监听提交
			form.on('submit(formDemo)', function(data) {
				layer.msg(JSON.stringify(data.field));
				
				
				
				$.ajax({

					url : "../Cwxmhservlet?page="+
							"1"+
							"&limit="+
							+"10",
					type : "get",
					data : data.field,
					success : function(res) {
						if(res.code==0){
							var $box=$("#box");
							//$box.enpty();
							for(var i=0;i<res.data.length;i++){
								
								var p=res.data[i];
								
								$box.append("<div class='content layui-row'>"+
								        "<div class='layui-col-xs12 layui-col-sm6 layui-col-md7 layui-col-lg6 content-img'><a href='newsDetail.html?id="+p.id+"'><img src='../img/"+p.photo+"' width='500px' style='padding-left:100px'   ></a></div>"+
								       "<div class='layui-col-xs12 layui-col-sm6 layui-col-md5 layui-col-lg6 right'>"+
								          "<p class'label'><a href='newsDetail.html?id="+p.id+"'>"+p.name+"</a></p>"+
								          "<p class='detail'> <a href='newsDetail.html?id="+p.id+"'>"+p.jianjie+"</a></p>"+
								          
								       "</div></div>")
							}
						}
					}
				});
				return false;
			});
		});
		</script>
<script>
$("#head").load("页眉.html");
$("#footer").load("页脚.html");
</script>


	
	<script>
		layui.config({
			base : '../res/static/js/'
		}).use('firm');
	</script>
</body>
</html>